<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>CesiumMeshVisualizer参考文档: 类: CSG</title>

    <script src="scripts/prettify/prettify.js"> </script>
    <script src="scripts/prettify/lang-css.js"> </script>
    <!--[if lt IE 9]>
      <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->
    <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
    <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>

<body>

<div id="main">

    <h1 class="page-title">类: CSG</h1>

    




<section>

<header>
    
        <h2>
            <span class="ancestors"><a href="Cesium.html">Cesium</a>.</span>
        
        CSG
        </h2>
        
    
</header>

<article>
    <div class="container-overview">
    
        

    

    <h4 class="name" id="CSG"><span class="type-signature"></span>new CSG<span class="signature">()</span><span class="type-signature"></span></h4>

    



<div class="description">
    源码参见<a href="https://github.com/jscad/csg.js">https://github.com/jscad/csg.js</a> <br/>
Constructive Solid Geometry (CSG) is a modeling technique that uses Boolean<br/>
operations like union and intersection to combine 3D solids. This library<br/>
implements CSG operations on meshes elegantly and concisely using BSP trees,<br/>
and is meant to serve as an easily understandable implementation of the<br/>
algorithm. All edge cases involving overlapping coplanar polygons in both<br/>
solids are correctly handled.<br/>
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumMeshVisualizer.js.html">CesiumMeshVisualizer.js</a>, <a href="CesiumMeshVisualizer.js.html#line759">line 759</a>
    </li></ul></dd>
    

    

    

    
</dl>















    <h5>Example</h5>
    
    <pre class="prettyprint"><code>MeshVisualizer = Cesium.MeshVisualizer;
        Mesh = Cesium.Mesh;
        MeshMaterial = Cesium.MeshMaterial;
        CSG = Cesium.CSG;  
        GeometryUtils = Cesium.GeometryUtils; 
         //示例1:
         var cube = CSG.cube();
         var sphere = CSG.sphere({ radius: 1.3 });
         var polygons = cube.subtract(sphere).toPolygons();


         //示例2： 
        var center = Cesium.Cartesian3.fromDegrees(homePosition[0], homePosition[1], 50000);
        var modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(center);

        var meshVisualizer = new MeshVisualizer({
            modelMatrix: modelMatrix,
            up: { z: 1 }
        });
        viewer.scene.primitives.add(meshVisualizer);
         
        var material = new MeshMaterial({
            defaultColor: "rgba(0,0,255,1.0)",
            wireframe: true,
            side: MeshMaterial.Sides.DOUBLE
        });

        //创建盒子
        var dimensions = new Cesium.Cartesian3(100000, 50000, 50000);
        var boxGeometry = Cesium.BoxGeometry.createGeometry(Cesium.BoxGeometry.fromDimensions({
            dimensions: dimensions,
            vertexFormat: Cesium.VertexFormat.POSITION_ONLY
        }));
        var box = GeometryUtils.toCSG(boxGeometry);
        var boxMesh = new Mesh(box, material);
        meshVisualizer.add(boxMesh);

        //创建球体
        var sphere = new Cesium.SphereGeometry({
            radius: 50000.0,
            vertexFormat: Cesium.VertexFormat.POSITION_ONLY
        });
        sphere = Cesium.SphereGeometry.createGeometry(sphere);
        sphere = CSG.toCSG(sphere);
        var sphereMesh = new Mesh(sphere, material);
        sphereMesh.position = new Cesium.Cartesian3(100000, 0, 0)
        meshVisualizer.add(sphereMesh);

        //并
        var unionResult = box.union(sphere);
        var unionResultMesh = new Mesh(unionResult, material);
        unionResultMesh.position = new Cesium.Cartesian3(300000, 0, 0)
        meshVisualizer.add(unionResultMesh);

        //交
        var intersectResult = box.intersect(sphere);
        var intersectResultMesh = new Mesh(intersectResult, material);
        intersectResultMesh.position = new Cesium.Cartesian3(500000, 0, 0)
        meshVisualizer.add(intersectResultMesh);

        //球体减盒子
        var subResult = sphere.subtract(box);
        var subResultMesh = new Mesh(subResult, material);
        subResultMesh.position = new Cesium.Cartesian3(700000, 0, 0)
        meshVisualizer.add(subResultMesh);

        //盒子减球体
        var subResult2 = box.subtract(sphere);
        var subResultMesh2 = new Mesh(subResult2, material);
        subResultMesh2.position = new Cesium.Cartesian3(900000, 0, 0)
        meshVisualizer.add(subResultMesh2);

        //渲染CSG创建的几何体
        var cube = CSG.cube({
            center: [0, 0, 0],
            radius: 20000
        });
        var cubeMtl = new MeshMaterial({
            defaultColor: "rgba(255,0,0,1)"
        });
        meshVisualizer.add(new Mesh({
            geometry: cube,
            material: cubeMtl,
            position: new Cesium.Cartesian3(-100000, 0, 0)
        }));</code></pre>



    
    </div>

    

    

    
        <h3 class="subsection-title">Classes</h3>

        <dl>
            <dt><a href="Cesium.CSG.CSG.Node.html">CSG.Node</a></dt>
            <dd></dd>
        
            <dt><a href="Cesium.CSG.CSG.Plane.html">CSG.Plane</a></dt>
            <dd></dd>
        
            <dt><a href="Cesium.CSG.CSG.Polygon.html">CSG.Polygon</a></dt>
            <dd></dd>
        
            <dt><a href="Cesium.CSG.CSG.Vector.html">CSG.Vector</a></dt>
            <dd></dd>
        
            <dt><a href="Cesium.CSG.CSG.Vertex.html">CSG.Vertex</a></dt>
            <dd></dd>
        </dl>
    

     

    

    
        <h3 class="subsection-title">Members</h3>

        
            
<h4 class="name" id=".Plane.EPSILON"><span class="type-signature">(static) </span>Plane.EPSILON<span class="type-signature"></span></h4>




<div class="description">
    `CSG.Plane.EPSILON` is the tolerance used by `splitPolygon()` to decide if a</br/>
point is on the plane.
</div>







<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumMeshVisualizer.js.html">CesiumMeshVisualizer.js</a>, <a href="CesiumMeshVisualizer.js.html#line1253">line 1253</a>
    </li></ul></dd>
    

    

    

    
</dl>






        
    

    
        <h3 class="subsection-title">Methods</h3>

        
            

    

    <h4 class="name" id=".CSG.cube"><span class="type-signature">(static) </span>CSG.cube<span class="signature">(options)</span><span class="type-signature"> &rarr; {<a href="Cesium.CSG.html">Cesium.CSG</a>}</span></h4>

    



<div class="description">
    Construct an axis-aligned solid cuboid. Optional parameters are `center` and<br/>
`radius`, which default to `[0, 0, 0]` and `[1, 1, 1]`. The radius can be<br/>
specified using a single number or a list of three numbers, one for each axis.<br/>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">
                <h6>Properties</h6>
                

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>center</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;Number></span>
|

<span class="param-type"><a href="Cesium.CSG.Vector.html">Cesium.CSG.Vector</a></span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    [0, 0, 0]
                
                </td>
            

            <td class="description last"></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>radius</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>
|

<span class="param-type">Array.&lt;Number></span>
|

<span class="param-type"><a href="Cesium.CSG.Vector.html">Cesium.CSG.Vector</a></span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    1
                
                </td>
            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumMeshVisualizer.js.html">CesiumMeshVisualizer.js</a>, <a href="CesiumMeshVisualizer.js.html#line919">line 919</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Cesium.CSG.html">Cesium.CSG</a></span>


    </dd>
</dl>

    


    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var cube = CSG.cube({
      center: [0, 0, 0],
      radius: 1
    });</code></pre>



        
            

    

    <h4 class="name" id=".CSG.cylinder"><span class="type-signature">(static) </span>CSG.cylinder<span class="signature">(options)</span><span class="type-signature"> &rarr; {<a href="Cesium.CSG.html">Cesium.CSG</a>}</span></h4>

    



<div class="description">
    Construct a solid cylinder. Optional parameters are `start`, `end`,<br/>
`radius`, and `slices`, which default to `[0, -1, 0]`, `[0, 1, 0]`, `1`, and<br/>
`16`. The `slices` parameter controls the tessellation.<br/>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">
                <h6>Properties</h6>
                

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>start</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;Number></span>
|

<span class="param-type"><a href="Cesium.CSG.Vector.html">Cesium.CSG.Vector</a></span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    [0, -1, 0]
                
                </td>
            

            <td class="description last"></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>end</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;Number></span>
|

<span class="param-type"><a href="Cesium.CSG.Vector.html">Cesium.CSG.Vector</a></span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    [0, -1, 0]
                
                </td>
            

            <td class="description last"></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>radius</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    1
                
                </td>
            

            <td class="description last"></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>slices</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    16
                
                </td>
            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumMeshVisualizer.js.html">CesiumMeshVisualizer.js</a>, <a href="CesiumMeshVisualizer.js.html#line1016">line 1016</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Cesium.CSG.html">Cesium.CSG</a></span>


    </dd>
</dl>

    


    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var cylinder = CSG.cylinder({
      start: [0, -1, 0],
      end: [0, 1, 0],
      radius: 1,
      slices: 16
    });</code></pre>



        
            

    

    <h4 class="name" id=".CSG.sphere"><span class="type-signature">(static) </span>CSG.sphere<span class="signature">(options)</span><span class="type-signature"> &rarr; {<a href="Cesium.CSG.html">Cesium.CSG</a>}</span></h4>

    



<div class="description">
    Construct a solid sphere. Optional parameters are `center`, `radius`,<br/>
`slices`, and `stacks`, which default to `[0, 0, 0]`, `1`, `16`, and `8`.<br/>
The `slices` and `stacks` parameters control the tessellation along the<br/>
longitude and latitude directions.<br/>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>options</code></td>
            

            <td class="type">
            
                
<span class="param-type">Object</span>


            
            </td>

            

            

            <td class="description last">
                <h6>Properties</h6>
                

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        
        <th>Default</th>
        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>center</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;Number></span>
|

<span class="param-type"><a href="Cesium.CSG.Vector.html">Cesium.CSG.Vector</a></span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    [0, 0, 0]
                
                </td>
            

            <td class="description last"></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>radius</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    1
                
                </td>
            

            <td class="description last"></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>slices</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    16
                
                </td>
            

            <td class="description last"></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>stacks</code></td>
            

            <td class="type">
            
                
<span class="param-type">Number</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            
                <td class="default">
                
                    8
                
                </td>
            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>

            </td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumMeshVisualizer.js.html">CesiumMeshVisualizer.js</a>, <a href="CesiumMeshVisualizer.js.html#line965">line 965</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Cesium.CSG.html">Cesium.CSG</a></span>


    </dd>
</dl>

    


    <h5>Example</h5>
    
    <pre class="prettyprint"><code>var sphere = CSG.sphere({
      center: [0, 0, 0],
      radius: 1,
      slices: 16,
      stacks: 8
    });</code></pre>



        
            

    

    <h4 class="name" id=".fromCSG"><span class="type-signature">(static) </span>fromCSG<span class="signature">(csg_model)</span><span class="type-signature"> &rarr; {Cesium.Geometry}</span></h4>

    











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>csg_model</code></td>
            

            <td class="type">
            
                
<span class="param-type">CSG</span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumMeshVisualizer.js.html">CesiumMeshVisualizer.js</a>, <a href="CesiumMeshVisualizer.js.html#line1569">line 1569</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Cesium.Geometry</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id=".fromPolygons"><span class="type-signature">(static) </span>fromPolygons<span class="signature">(polygons)</span><span class="type-signature"></span></h4>

    



<div class="description">
    Construct a CSG solid from a list of `CSG.Polygon` instances.
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>polygons</code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="Cesium.CSG.Polygon.html">Cesium.CSG.Polygon</a>></span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    

        <tr>
            
                <td class="name"><code></code></td>
            

            <td class="type">
            
                
<span class="param-type">Array.&lt;<a href="Cesium.CSG.html">Cesium.CSG</a>></span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumMeshVisualizer.js.html">CesiumMeshVisualizer.js</a>, <a href="CesiumMeshVisualizer.js.html#line769">line 769</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id=".Plane.fromPoints"><span class="type-signature">(static) </span>Plane.fromPoints<span class="signature">(a, b, c)</span><span class="type-signature"></span></h4>

    











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>a</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Cesium.CSG.Vector.html">Cesium.CSG.Vector</a></span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>b</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Cesium.CSG.Vector.html">Cesium.CSG.Vector</a></span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>c</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Cesium.CSG.Vector.html">Cesium.CSG.Vector</a></span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumMeshVisualizer.js.html">CesiumMeshVisualizer.js</a>, <a href="CesiumMeshVisualizer.js.html#line1262">line 1262</a>
    </li></ul></dd>
    

    

    

    
</dl>
















        
            

    

    <h4 class="name" id=".toCSG"><span class="type-signature">(static) </span>toCSG<span class="signature">(geometry, offset<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {CSG}</span></h4>

    











    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        
        <th>Attributes</th>
        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>geometry</code></td>
            

            <td class="type">
            
                
<span class="param-type">Cesium.Geometry</span>


            
            </td>

            
                <td class="attributes">
                

                

                
                </td>
            

            

            <td class="description last"></td>
        </tr>

    

        <tr>
            
                <td class="name"><code>offset</code></td>
            

            <td class="type">
            
                
<span class="param-type">Cesium.Cartesian3</span>


            
            </td>

            
                <td class="attributes">
                
                    &lt;optional><br>
                

                

                
                </td>
            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumMeshVisualizer.js.html">CesiumMeshVisualizer.js</a>, <a href="CesiumMeshVisualizer.js.html#line1514">line 1514</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">CSG</span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id="clone"><span class="type-signature"></span>clone<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Cesium.CSG.html">Cesium.CSG</a>}</span></h4>

    















<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumMeshVisualizer.js.html">CesiumMeshVisualizer.js</a>, <a href="CesiumMeshVisualizer.js.html#line779">line 779</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Cesium.CSG.html">Cesium.CSG</a></span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id="intersect"><span class="type-signature"></span>intersect<span class="signature">(csg)</span><span class="type-signature"> &rarr; {<a href="Cesium.CSG.html">Cesium.CSG</a>}</span></h4>

    



<div class="description">
    Return a new CSG solid representing space both this solid and in the<br/>
solid `csg`. Neither this solid nor the solid `csg` are modified.<br/>
<br/>
    A.intersect(B)<br/>
<br/>
<pre><code>
    +-------+ 
    |       | 
    |   A   | 
    |    +--+----+   =   +--+ 
    +----+--+    |       +--+ 
         |   B   | 
         |       | 
         +-------+ 

</code></pre>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>csg</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Cesium.CSG.html">Cesium.CSG</a></span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumMeshVisualizer.js.html">CesiumMeshVisualizer.js</a>, <a href="CesiumMeshVisualizer.js.html#line877">line 877</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Cesium.CSG.html">Cesium.CSG</a></span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id="inverse"><span class="type-signature"></span>inverse<span class="signature">()</span><span class="type-signature"> &rarr; {<a href="Cesium.CSG.html">Cesium.CSG</a>}</span></h4>

    



<div class="description">
    Return a new CSG solid with solid and empty space switched. This solid is
not modified.
</div>













<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumMeshVisualizer.js.html">CesiumMeshVisualizer.js</a>, <a href="CesiumMeshVisualizer.js.html#line895">line 895</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Cesium.CSG.html">Cesium.CSG</a></span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id="subtract"><span class="type-signature"></span>subtract<span class="signature">(csg)</span><span class="type-signature"> &rarr; {<a href="Cesium.CSG.html">Cesium.CSG</a>}</span></h4>

    



<div class="description">
    Return a new CSG solid representing space in this solid but not in the<br/>
solid `csg`. Neither this solid nor the solid `csg` are modified.<br/>
<br/>
    A.subtract(B)<br/>
<br/>
<pre><code>
    +-------+            +-------+ 
    |       |            |       | 
    |   A   |            |       | 
    |    +--+----+   =   |    +--+ 
    +----+--+    |       +----+ 
         |   B   | 
         |       | 
         +-------+ 
 
</code></pre>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>csg</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Cesium.CSG.html">Cesium.CSG</a></span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumMeshVisualizer.js.html">CesiumMeshVisualizer.js</a>, <a href="CesiumMeshVisualizer.js.html#line843">line 843</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Cesium.CSG.html">Cesium.CSG</a></span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id="toPolygons"><span class="type-signature"></span>toPolygons<span class="signature">()</span><span class="type-signature"> &rarr; {Array.&lt;<a href="Cesium.CSG.Polygon.html">Cesium.CSG.Polygon</a>>}</span></h4>

    















<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumMeshVisualizer.js.html">CesiumMeshVisualizer.js</a>, <a href="CesiumMeshVisualizer.js.html#line788">line 788</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type">Array.&lt;<a href="Cesium.CSG.Polygon.html">Cesium.CSG.Polygon</a>></span>


    </dd>
</dl>

    



        
            

    

    <h4 class="name" id="union"><span class="type-signature"></span>union<span class="signature">(csg)</span><span class="type-signature"> &rarr; {<a href="Cesium.CSG.html">Cesium.CSG</a>}</span></h4>

    



<div class="description">
    Return a new CSG solid representing space in either this solid or in the<br/>
solid `csg`. Neither this solid nor the solid `csg` are modified.<br/>
<br/>
    A.union(B)<br/>
<br/>
<pre><code>
    +-------+            +-------+
    |       |            |       |
    |   A   |            |       |
    |    +--+----+   =   |       +----+
    +----+--+    |       +----+       |
         |   B   |            |       |
         |       |            |       | 
         +-------+            +-------+
</code></pre>
</div>









    <h5>Parameters:</h5>
    

<table class="params">
    <thead>
    <tr>
        
        <th>Name</th>
        

        <th>Type</th>

        

        

        <th class="last">Description</th>
    </tr>
    </thead>

    <tbody>
    

        <tr>
            
                <td class="name"><code>csg</code></td>
            

            <td class="type">
            
                
<span class="param-type"><a href="Cesium.CSG.html">Cesium.CSG</a></span>


            
            </td>

            

            

            <td class="description last"></td>
        </tr>

    
    </tbody>
</table>






<dl class="details">

    

    

    

    

    

    

    

    

    

    

    

    

    
    <dt class="tag-source">Source:</dt>
    <dd class="tag-source"><ul class="dummy"><li>
        <a href="CesiumMeshVisualizer.js.html">CesiumMeshVisualizer.js</a>, <a href="CesiumMeshVisualizer.js.html#line811">line 811</a>
    </li></ul></dd>
    

    

    

    
</dl>













<h5>Returns:</h5>

        


<dl>
    <dt>
        Type
    </dt>
    <dd>
        
<span class="param-type"><a href="Cesium.CSG.html">Cesium.CSG</a></span>


    </dd>
</dl>

    



        
    

    

    
</article>

</section>




</div>

<nav>
    <h2><a href="index.html">主页</a></h2><h3>命名空间</h3><ul><li><a href="Cesium.html">Cesium</a></li></ul><h3>类</h3><ul><li><h5><a href="Cesium.html">Cesium</a></h5></li><li><a href="Cesium.ArrowGeometry.html">ArrowGeometry</a></li><li><a href="Cesium.BasicGeometry.html">BasicGeometry</a></li><li><a href="Cesium.CSG.html">CSG</a></li><li><a href="Cesium.CSG.CSG.Node.html">CSG.Node</a></li><li><a href="Cesium.CSG.CSG.Plane.html">CSG.Plane</a></li><li><a href="Cesium.CSG.CSG.Polygon.html">CSG.Polygon</a></li><li><a href="Cesium.CSG.CSG.Vector.html">CSG.Vector</a></li><li><a href="Cesium.CSG.CSG.Vertex.html">CSG.Vertex</a></li><li><a href="Cesium.FramebufferTexture.html">FramebufferTexture</a></li><li><a href="Cesium.GeometryUtils.html">GeometryUtils</a></li><li><a href="Cesium.LOD.html">LOD</a></li><li><a href="Cesium.Mesh.html">Mesh</a></li><li><a href="Cesium.MeshMaterial.html">MeshMaterial</a></li><li><a href="Cesium.MeshVisualizer.html">MeshVisualizer</a></li><li><a href="Cesium.Path.html">Path</a></li><li><a href="Cesium.PlaneBufferGeometry.html">PlaneBufferGeometry</a></li><li><a href="Cesium.PlaneGeometry.html">PlaneGeometry</a></li><li><a href="Cesium.ReferenceMesh.html">ReferenceMesh</a></li><li><a href="Cesium.RendererUtils.html">RendererUtils</a></li><li><a href="Cesium.Rotation.html">Rotation</a></li></ul>
</nav>

<br class="clear">

<footer>
    Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0</a> on Tue Jan 23 2018 23:09:03 GMT+0800 (中国标准时间)
</footer>

<script> prettyPrint(); </script>
<script src="scripts/linenumber.js"> </script>
</body>
</html>
